/**   
 * @Project: SpringInAction 
 * @Title: TalkProxy.java 
 * @Package net.weamor.spring.principle 
 * @Description: TODO 
 * @author weamor
 * @date 2015年11月9日 下午7:51:59 
 * @version V1.0   
 */
package net.weamor.spring.principle;

/** 
 * @ClassName TalkProxy  
 * @Description TODO 
 * @author weamor
 * @date 2015年11月9日  
 *   
 */
public class TalkProxy implements ITalk {

	private ITalk talker;

	public TalkProxy(ITalk talker) {
		// super();
		this.talker = talker;
	}

	public void talk(String msg) {
		talker.talk(msg);
	}

	public void talk(String msg, String singname) {
		talker.talk(msg);
		sing(singname);
	}

	private void sing(String singname) {
		System.out.println("唱歌：" + singname);
	}

}
